package com.jiai.cloud.feign;

import com.jiai.cloud.entity.TUser;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;


/**
 * Created by Administrator on 2017/6/2.
 */
@FeignClient("authentication")
public interface TUserAPI {
    //邮箱判断
    @RequestMapping( value = "/user/judgeUser" ,method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"})
    Object judgeUser(@RequestParam("email") String email);
    //注册
    @RequestMapping(value = "/user/register",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"})
     Object register(@RequestBody TUser user);
    //登录
    @RequestMapping(value = "/user/login" ,method=RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    Object  login(@RequestParam("loginName")String loginName ,@RequestParam("password")String password);

}
